#!/bin/bash
#=======================================================================
#
#          FILE: random_num.sh
#         USAGE: ./random_num.sh <limit>
#   DESCRIPTION: Randomize a number smaller than the limit
#  REQUIREMENTS: expr
#          BUGS: N/A
#         NOTES: N/A
#        AUTHOR: Ali Ayoub
#         EMAIL: ali@mellanox.com
#       COMPANY: N/A
#       CREATED: 09.17.2010-15:52:21
#      REVISION: 1.0
#=======================================================================

USAGE="Usage: $0 <limit>"
if [ ! $# == 1 ]; then
	echo $USAGE
	exit
fi

limit=$1

echo `expr $RANDOM % $limit + 1`
exit 0
